<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/jsp/taglib.jsp"%>
<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>商品详情</title>
    <meta name="description" content="这是一个 首页面">
    <meta name="keywords" content="index">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />


    <link href="${ctxStatic}/plugins/h+/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="${ctxStatic}/plugins/h+/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="${ctxStatic}/plugins/h+/css/animate.min.css" rel="stylesheet">
    <%--<link href="${ctxStatic}/plugins/h+/css/style.min862f.css?v=4.1.0" rel="stylesheet">--%>
    <link rel="stylesheet" type="text/css" href="${ctxStatic}/plugins/h+/css/plugins/webuploader/webuploader.css">
    <link href="${ctxStatic}/plugins/h+/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">

    <link href="${ctxStatic}/plugins/h+/css/font-awesome.min.css" rel="stylesheet">
    <link href="${ctxStatic}/plugins/h+/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="${ctxStatic}/plugins/h+/css/plugins/chosen/chosen.css" rel="stylesheet">
    <link href="${ctxStatic}/plugins/h+/css/plugins/colorpicker/css/bootstrap-colorpicker.min.css" rel="stylesheet">
    <link href="${ctxStatic}/plugins/h+/css/plugins/cropper/cropper.min.css" rel="stylesheet">
    <link href="${ctxStatic}/plugins/h+/css/plugins/switchery/switchery.css" rel="stylesheet">
    <link href="${ctxStatic}/plugins/h+/css/plugins/jasny/jasny-bootstrap.min.css" rel="stylesheet">
    <link href="${ctxStatic}/plugins/h+/css/plugins/nouslider/jquery.nouislider.css" rel="stylesheet">
    <link href="${ctxStatic}/plugins/h+/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
    <link href="${ctxStatic}/plugins/h+/css/plugins/ionRangeSlider/ion.rangeSlider.css" rel="stylesheet">
    <link href="${ctxStatic}/plugins/h+/css/plugins/ionRangeSlider/ion.rangeSlider.skinFlat.css" rel="stylesheet">
    <link href="${ctxStatic}/plugins/h+/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css" rel="stylesheet">
    <link href="${ctxStatic}/plugins/h+/css/plugins/clockpicker/clockpicker.css" rel="stylesheet">
    <link href="${ctxStatic}/plugins/h+/css/animate.min.css" rel="stylesheet">
    <link href="${ctxStatic}/plugins/h+/css/style.min.css?v=4.0.0" rel="stylesheet"><base target="_blank">
    <style>
        .myselect{
            background: #fff;
            box-shadow: none;
            -moz-box-sizing: border-box;
            background-color: #FFF;
            border: 1px solid #CBD5DD;
            border-radius: 2px;
            cursor: text;
            height: auto!important;
            margin: 0;
            min-height: 30px;
            overflow: hidden;
            padding: 4px 12px;
        }
    </style>
    <script src="${ctxStatic}/plugins/h+/js/jquery.min.js?v=2.1.4"></script>
</head>
<div class="panel-body">
        <form class="" id="form" name="form">
            <input type="hidden" name="types" id="form_id" value="${mainId}">
            <input type="hidden" name="detailId" id="form_detailId" value="${detailId}">
            <input type="hidden" id="obj_id" name="pmeeting.id" />
           <%-- <div class="" id="form_remove">
                <div class="">--%>
        <div class="tab-content">
            <div id="tab-0" class="tab-pane active">
                <div class="ibox-content">
                    <div class="form-group">
                        <label class="col-sm-12 control-label">收货人姓名：<span id="select_recPersonName">${boList.recPersonName}</span></label>
                        <%--<div class="col-sm-4 am-padding-0 am-text-center">收货人姓名：</div>--%>

                    </div>
                    <div class="form-group">
                        <label class="col-sm-12 control-label">收货人电话：<span id="select_userphone">${boList.userphone}</span></label>
                       <%-- <div class="col-sm-4 am-padding-0 am-text-center">收货人电话：</div>--%>

                    </div>
                    <div class="form-group">
                        <label class="col-sm-12 control-label">收货人地址：<span id="select_buyAddr">${boList.buyAddr}</span></label>
                       <%-- <div class="col-sm-4 am-padding-0 am-text-center">收花人地址：</div>--%>

                    </div>
                    <div class="form-group">
                        <label class="col-sm-12 control-label">买家留言：<span id="select_message"> ${message}</span></label>
                        <%--<div class="col-sm-4 am-padding-0 am-text-center">买家留言：</div>--%>

                    </div>
                    <div class="form-group">
                        <label class="col-sm-12 control-label">快递方式：
                            <c:if test="${takeWay =='0'}">自提</c:if><c:if test="${takeWay =='1'}">快递</c:if>
                        </label>
                    </div>
<c:if test="${takeWay =='1'}">
                    <div class="form-group" id="boolscand" >
                        <label class="col-sm-12 control-label">选择物流：
                            <select  id="select_sandwlname"  data-placeholder="选择物流..." class="chosen-select myselect" style="width:200px" tabindex="1">
                                <option value="顺丰快递">顺丰快递</option>
                                <option value="韵达快递">韵达快递</option>
                                <option value="申通快递">申通快递</option>
                                <option value="中通快递">中通快递</option>
                                <option value="圆通快递">圆通快递</option>
                                <option value="天天快递">天天快递</option>
                                <option value="优速快递">优速快递</option>
                                <option value="EMS">EMS</option>
                                <option value="安能物流">安能物流</option>
                                <option value="百世汇通">百世汇通</option>
                            </select>
                        </label>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-12 control-label">物流单号： <input id="intput_sendCode" class="myselect" style="width: 200px;"/></label>

                    </div>
</c:if>
                </div>
            </div>
        </div>
        </form>
        <div class="form-group">
            <div  class="col-sm-offset-3 col-sm-8" style="text-align: center;">
                <button type="button" class="btn btn-primary"
                        id="tijiaobaocun" onclick="savesand();">提交保存</button>
                <button type="button" class="btn btn-primary"
                        onclick="closePop();">放弃保存</button>
            </div>
        </div>
</div>
<body>
<script>
    var index = parent.layer.getFrameIndex(window.name);





    function savesand() {
        var orderid = $("#form_id").val();// orderid 订单order_main 的id ，改变所有子订单的物流配送
        var detailId=$("#form_detailId").val();
        var logisticsCompany = $("#select_sandwlname option:selected").val();// logisticsCompany 快递公司名称
        var sendCode = $("#intput_sendCode").val();// sendCode 快递单号
        var url = '${pageContext.request.contextPath}/order/saveOrderSendANDOrderStateFH.ac';
        $.ajax({
            url : url,
            type : "post",
            data : {
                orderid : orderid,
                sendType : '${takeWay}',
                logisticsCompany : logisticsCompany,
                sendCode : sendCode,
                detailId:detailId
            },
            dataType : "json",
            success : function(data) {
                if(data.res=='success')
                {
                    parent.reloadTable();
                    parent.layer.close(index);
                }else
                {
                    alert(data.res);
                }
            }
        });

    }

    function closePop()
    {
        parent.layer.close(index);
    }


</script>
</body>

</html>
